//
//  KSKAMainTool.m
//  DashboardHD
//
//  Created by 楊亜玲 on 17/3/24.
//  Copyright © 2017年 Totyu. All rights reserved.
//

#import "KSKAMainTool.h"

@implementation KSKAMainTool
+(void)custListWithParam:(KSKAMainParam *)param success:(void (^)(NSArray *array))success failure:(void (^)(NSError *error))failure{
    [KSKAHttpTool postWithURL:@"https://mimamori2.azurewebsites.net/dashboard/zwgetcustlist.php" params:param.mj_keyValues success:^(id json) {
        if (success) {
            // 字典数组转模型数组
            NSArray *noticesArray = [KSKAMainResult mj_objectArrayWithKeyValuesArray:[json objectForKey:@"custlist"]];
            success(noticesArray);
        }
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
}


@end
